import 'package:flutter/material.dart';

class ThemeUtil {
  //APP的背景颜色
  static const int primaryBackgroundValue = 0xFFF4F3F6;

  //以下为主题色的主色调
  static const int _primaryBlueValue = 0xFF0b90b5;
  static const int _primaryValue = 0xFF607D8B;

  static const int primaryBlueValue50 = 0xFF29D2BD;

  //半透明白色字体
  static const int primaryWhiteValue50 = 0X80FFFFFF;

  //蓝色
  static const int primaryBlueValue = 0XFF6DA3F6;

  //黄色
  static const int primaryYellowValue = 0XFFE3C686;

  //选中日历颜色
  static const int primaryCalendarSelectValue = 0XFFFE6674;

  //日历背景颜色
  static const int primaryCalendarBgValue = 0XFF141518;

  //选中经期预测颜色
  static const int primarPredictionValue = 0XFFEB5664;

  //选中卵泡期颜色
  static const int primarFollicularValue = 0XFFA5CC7E;

  //选中主界面易孕期颜色
  static const int primarMainPregnancyValue = 0XFF7376BB;

  //选中易孕期颜色
  static const int primarPregnancyValue = 0XFF383A81;

  //选中排卵期颜色
  static const int primarOvulationValue = 0XFF4120FF;

  //选中黄体期颜色
  static const int primarLutealValue = 0XFFE3C686;

  //主界面预测颜色
  static const int primarMainPredictionValue = 0XFF685E61;

  //选中透明颜色
  static const int primarTransparentValue = 0X00000000;

  //等待框颜色
  static const int primarProgressValue = 0XFF6EA4F5;

  //日历界面预测经期颜色
  static const int primarCalendarPredictionValue = 0XFF3B1619;

  //日历界面经期颜色
  static const int primarCalendarMenstruationValue = 0XFF67262C;

  //选中易孕期开始颜色
  static const int primarPregnancyStartValue = 0XFF1F1F43;

  //选中易孕期结束颜色
  static const int primarPregnancyEndValue = 0XFF2B2C61;

  static const MaterialColor jswTheme = MaterialColor(
    _primaryBlueValue,
    <int, Color>{
      30: Color(0xFF2FF1D9),
      40: Color(0xFF2CC9B1),
      50: Color(primaryBlueValue50),
      100: Color(0xFFb5e7fc),
      200: Color(0xFF84d9f9),
      300: Color(0xFF54c9f2),
      400: Color(0xFF33beec),
      // only for raised button while pressed in light theme
      500: Color(0xFF26b4e4),
      600: Color(0xFF1da4d0),
      700: Color(_primaryValue),
      800: Color(0xFF007d9c),
      900: Color(0xFF005b6f),
    },
  );

  ///toolbar白色上面标题文字
  static TextStyle toolbar = const TextStyle(
      fontFamily: 'Medium',
      fontSize: 16,
      color: Colors.white);

  ///超大标题白色加粗文字
  static TextStyle h1 = const TextStyle(
      fontFamily: 'Demi_bold',
      decoration: TextDecoration.none,
      fontSize: 22,
      color: Colors.white);

  ///大点正文
  static TextStyle p1 = const TextStyle(
      fontFamily: 'Demi_bold',
      decoration: TextDecoration.none,
      fontSize: 18,
      color: Colors.white);

  ///正常正文
  static TextStyle p2 = const TextStyle(
      fontFamily: 'Regular',
      decoration: TextDecoration.none,
      fontSize: 15,
      color: Colors.white);

  ///正常正文
  static TextStyle mp = const TextStyle(
      fontFamily: 'Medium',
      decoration: TextDecoration.none,
      fontSize: 18,
      color: Colors.white);

  ///正常正文
  static TextStyle mp2 = const TextStyle(
      fontFamily: 'Medium',
      decoration: TextDecoration.none,
      fontSize: 16,
      color: Colors.white);

  ///正常小的正文
  static TextStyle mp3 = const TextStyle(
      fontFamily: 'Medium',
      decoration: TextDecoration.none,
      fontSize: 14,
      color: Colors.white);

  ///小的正文
  static TextStyle mp4 = const TextStyle(
      fontFamily: 'Medium',
      decoration: TextDecoration.none,
      fontSize: 12,
      color: Colors.white);

  //蓝色字体按钮背景Style
  static BoxDecoration themeConStyle = BoxDecoration(
    borderRadius: const BorderRadius.all(Radius.circular(10.0)),
    border: Border.all(width: 1, color: Colors.transparent),
    gradient: const LinearGradient(
      begin: Alignment.topLeft,
      end: Alignment.bottomRight,
      colors: [
        Color(primaryBlueValue),
        Color(primaryBlueValue),
      ],
    ),
  );

  //蓝色字体按钮Style
  static ButtonStyle themebtnStyle = ButtonStyle(
    textStyle: WidgetStateProperty.all(const TextStyle(fontSize: 16)),
    //设置边框
    minimumSize: WidgetStateProperty.all(const Size(350, 50)),
    //外边框装饰 会覆盖 side 配置的样式
    shape: WidgetStateProperty.all(RoundedRectangleBorder(
      borderRadius: BorderRadius.circular(10),
    )),
    foregroundColor: WidgetStateProperty.resolveWith(
          (states) {
        //默认状态使用灰色
        return Colors.white;
      },
    ),
  );
}
